.class public Lcom/zuimeia/ui/view/RippleImageView;
.super Landroid/widget/ImageView;
.source "RippleImageView.java"

# interfaces
.implements Lcom/zuimeia/ui/view/IRippleView;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/zuimeia/ui/view/RippleImageView$SavedState;
    }
.end annotation


# instance fields
.field private mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 29
    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lcom/zuimeia/ui/view/RippleImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 30
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;

    .prologue
    .line 33
    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Lcom/zuimeia/ui/view/RippleImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 34
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attrs"    # Landroid/util/AttributeSet;
    .param p3, "defStyleAttr"    # I

    .prologue
    .line 37
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 38
    invoke-direct {p0, p1, p2}, Lcom/zuimeia/ui/view/RippleImageView;->init(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 39
    return-void
.end method

.method static synthetic access$000(Lcom/zuimeia/ui/view/RippleImageView;)Lcom/zuimeia/ui/view/CircleRippleDrawable;
    .registers 2
    .param p0, "x0"    # Lcom/zuimeia/ui/view/RippleImageView;

    .prologue
    .line 24
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    return-object v0
.end method

.method private adjustDrawablePadding()V
    .registers 5

    .prologue
    const/4 v3, 0x0

    .line 147
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    if-eqz v0, :cond_12

    .line 148
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/RippleImageView;->getWidth()I

    move-result v1

    invoke-virtual {p0}, Lcom/zuimeia/ui/view/RippleImageView;->getHeight()I

    move-result v2

    invoke-virtual {v0, v3, v3, v1, v2}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setBounds(IIII)V

    .line 150
    :cond_12
    return-void
.end method

.method private getTypedArray(Landroid/content/Context;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;
    .registers 5
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attributeSet"    # Landroid/util/AttributeSet;
    .param p3, "attr"    # [I

    .prologue
    const/4 v0, 0x0

    .line 58
    invoke-virtual {p1, p2, p3, v0, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;

    move-result-object v0

    return-object v0
.end method

.method private init(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 9
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "attributeSet"    # Landroid/util/AttributeSet;

    .prologue
    .line 42
    sget-object v4, Lcom/zuimeia/ui/R$styleable;->CircleRippleView:[I

    invoke-direct {p0, p1, p2, v4}, Lcom/zuimeia/ui/view/RippleImageView;->getTypedArray(Landroid/content/Context;Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;

    move-result-object v0

    .line 45
    .local v0, "attr":Landroid/content/res/TypedArray;
    :try_start_6
    sget v4, Lcom/zuimeia/ui/R$styleable;->CircleRippleView_cr_color:I

    const/4 v5, -0x1

    invoke-virtual {v0, v4, v5}, Landroid/content/res/TypedArray;->getColor(II)I

    move-result v1

    .line 46
    .local v1, "color":I
    sget v4, Lcom/zuimeia/ui/R$styleable;->CircleRippleView_cr_scale:I

    const/4 v5, 0x1

    invoke-virtual {v0, v4, v5}, Landroid/content/res/TypedArray;->getInteger(II)I

    move-result v3

    .line 47
    .local v3, "scale":I
    sget v4, Lcom/zuimeia/ui/R$styleable;->CircleRippleView_cr_pressedDuration:I

    const/16 v5, 0x190

    invoke-virtual {v0, v4, v5}, Landroid/content/res/TypedArray;->getInteger(II)I

    move-result v2

    .line 49
    .local v2, "pressedDuration":I
    new-instance v4, Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-direct {v4, p1, v1, v3, v2}, Lcom/zuimeia/ui/view/CircleRippleDrawable;-><init>(Landroid/content/Context;III)V

    iput-object v4, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;
    :try_end_23
    .catchall {:try_start_6 .. :try_end_23} :catchall_2c

    .line 51
    invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V

    .line 54
    iget-object v4, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v4, p0}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setCallback(Landroid/graphics/drawable/Drawable$Callback;)V

    .line 55
    return-void

    .line 51
    .end local v1    # "color":I
    .end local v2    # "pressedDuration":I
    .end local v3    # "scale":I
    :catchall_2c
    move-exception v4

    invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V

    throw v4
.end method


# virtual methods
.method public animatePressedState()V
    .registers 2

    .prologue
    .line 98
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->animatePressedState()V

    .line 99
    return-void
.end method

.method public draw(Landroid/graphics/Canvas;)V
    .registers 3
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .prologue
    .line 81
    invoke-super {p0, p1}, Landroid/widget/ImageView;->draw(Landroid/graphics/Canvas;)V

    .line 82
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0, p1}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->draw(Landroid/graphics/Canvas;)V

    .line 83
    return-void
.end method

.method public bridge synthetic getDrawable()Landroid/graphics/drawable/Drawable;
    .registers 2

    .prologue
    .line 24
    invoke-virtual {p0}, Lcom/zuimeia/ui/view/RippleImageView;->getDrawable()Lcom/zuimeia/ui/view/CircleRippleDrawable;

    move-result-object v0

    return-object v0
.end method

.method public getDrawable()Lcom/zuimeia/ui/view/CircleRippleDrawable;
    .registers 2

    .prologue
    .line 124
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    return-object v0
.end method

.method public onRestoreInstanceState(Landroid/os/Parcelable;)V
    .registers 4
    .param p1, "state"    # Landroid/os/Parcelable;

    .prologue
    .line 142
    move-object v0, p1

    check-cast v0, Lcom/zuimeia/ui/view/RippleImageView$SavedState;

    .line 143
    .local v0, "savedState":Lcom/zuimeia/ui/view/RippleImageView$SavedState;
    invoke-virtual {v0}, Lcom/zuimeia/ui/view/RippleImageView$SavedState;->getSuperState()Landroid/os/Parcelable;

    move-result-object v1

    invoke-super {p0, v1}, Landroid/widget/ImageView;->onRestoreInstanceState(Landroid/os/Parcelable;)V

    .line 144
    return-void
.end method

.method public onSaveInstanceState()Landroid/os/Parcelable;
    .registers 3

    .prologue
    .line 135
    invoke-super {p0}, Landroid/widget/ImageView;->onSaveInstanceState()Landroid/os/Parcelable;

    move-result-object v1

    .line 136
    .local v1, "superState":Landroid/os/Parcelable;
    new-instance v0, Lcom/zuimeia/ui/view/RippleImageView$SavedState;

    invoke-direct {v0, v1}, Lcom/zuimeia/ui/view/RippleImageView$SavedState;-><init>(Landroid/os/Parcelable;)V

    .line 137
    .local v0, "savedState":Lcom/zuimeia/ui/view/RippleImageView$SavedState;
    return-object v0
.end method

.method protected onSizeChanged(IIII)V
    .registers 5
    .param p1, "w"    # I
    .param p2, "h"    # I
    .param p3, "oldw"    # I
    .param p4, "oldh"    # I

    .prologue
    .line 129
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/ImageView;->onSizeChanged(IIII)V

    .line 130
    invoke-direct {p0}, Lcom/zuimeia/ui/view/RippleImageView;->adjustDrawablePadding()V

    .line 131
    return-void
.end method

.method public setAnimationListener(Landroid/animation/Animator$AnimatorListener;)V
    .registers 3
    .param p1, "listener"    # Landroid/animation/Animator$AnimatorListener;

    .prologue
    .line 119
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0, p1}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setAnimationListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 120
    return-void
.end method

.method public setColor(I)V
    .registers 3
    .param p1, "color"    # I

    .prologue
    .line 103
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0, p1}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setColor(I)V

    .line 104
    return-void
.end method

.method public setInterpolator(Landroid/view/animation/Interpolator;)V
    .registers 3
    .param p1, "interpolator"    # Landroid/view/animation/Interpolator;

    .prologue
    .line 114
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0, p1}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setInterpolator(Landroid/view/animation/Interpolator;)V

    .line 115
    return-void
.end method

.method public setOnClickListener(Landroid/view/View$OnClickListener;)V
    .registers 4
    .param p1, "l"    # Landroid/view/View$OnClickListener;

    .prologue
    .line 63
    if-eqz p1, :cond_b

    .line 64
    new-instance v0, Lcom/zuimeia/ui/view/RippleImageView$1;

    invoke-direct {v0, p0, p1}, Lcom/zuimeia/ui/view/RippleImageView$1;-><init>(Lcom/zuimeia/ui/view/RippleImageView;Landroid/view/View$OnClickListener;)V

    .line 72
    .local v0, "onClickListener":Landroid/view/View$OnClickListener;
    invoke-super {p0, v0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 77
    .end local v0    # "onClickListener":Landroid/view/View$OnClickListener;
    :goto_a
    return-void

    .line 74
    :cond_b
    const/4 v1, 0x0

    invoke-super {p0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    goto :goto_a
.end method

.method public setPadding(IIII)V
    .registers 5
    .param p1, "left"    # I
    .param p2, "top"    # I
    .param p3, "right"    # I
    .param p4, "bottom"    # I

    .prologue
    .line 87
    invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/ImageView;->setPadding(IIII)V

    .line 88
    invoke-direct {p0}, Lcom/zuimeia/ui/view/RippleImageView;->adjustDrawablePadding()V

    .line 89
    return-void
.end method

.method public setPressedDuration(I)V
    .registers 3
    .param p1, "duration"    # I

    .prologue
    .line 109
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    invoke-virtual {v0, p1}, Lcom/zuimeia/ui/view/CircleRippleDrawable;->setPressedDuration(I)V

    .line 110
    return-void
.end method

.method protected verifyDrawable(Landroid/graphics/drawable/Drawable;)Z
    .registers 3
    .param p1, "who"    # Landroid/graphics/drawable/Drawable;

    .prologue
    .line 93
    iget-object v0, p0, Lcom/zuimeia/ui/view/RippleImageView;->mDrawable:Lcom/zuimeia/ui/view/CircleRippleDrawable;

    if-eq p1, v0, :cond_a

    invoke-super {p0, p1}, Landroid/widget/ImageView;->verifyDrawable(Landroid/graphics/drawable/Drawable;)Z

    move-result v0

    if-eqz v0, :cond_c

    :cond_a
    const/4 v0, 0x1

    :goto_b
    return v0

    :cond_c
    const/4 v0, 0x0

    goto :goto_b
.end method
